const express = require('express')
const advModel = require('../db/model/adv')
const route = express.Router()
route.get('/getAdv', async (req,res)=>{
    try{
        const findResult = await advModel.find({})
        console.log(findResult,'findResult');
        res.send({
            code:10000,
            msg:'查询广告信息成功',
            data:findResult
        })
    }catch(e){
        res.send({
            code:10001,
            msg:'查询广告信息异常'+e.message,
            data:null
        })
    }
})

module.exports = route;